package tk1.uebung3.model;

import java.util.ArrayList;
import java.util.List;

public class ShoppingCartContainer {

	private static List<ShoppingCart> shoppingCarts = new ArrayList<ShoppingCart>();
	
	
	public static void addShoppingCart(ShoppingCart newShoppingCart){
		shoppingCarts.add(newShoppingCart);
	}
	
	public static ShoppingCart getShoppingCart(String id){
		for(ShoppingCart cart : shoppingCarts){
			if(cart.getId().equals(id))
				return cart;
		}
		return null;
	}
}
